Conversation
2ae7df6 to
62af7c8
Compare
62af7c8 to
81da3d9
Compare
nolag
reviewed
Oct 28, 2025
core/capabilities/fakes/evm_chain.go
Outdated
| // Convert proto big-int to *big.Int; nil ⇒ latest (handled by geth toBlockNumArg) | ||
| var blockArg *big.Int | ||
| if input != nil { | ||
| blockArg = pb.NewIntFromBigInt(input.BlockNumber) // returns nil if input.BlockNumber is nil |
Contributor
There was a problem hiding this comment.
Should this be fined in FromBigInt?
Contributor
Author
There was a problem hiding this comment.
Here is the implementation:
func NewIntFromBigInt(b *BigInt) *big.Int {
if b == nil {
return nil
}
bigInt := new(big.Int).SetBytes(b.AbsVal)
if b.Sign < 0 {
bigInt = bigInt.Neg(bigInt)
}
return bigInt
}
nil will be returned as nil, others will be converted to *big.Int and return.
anirudhwarrier
previously approved these changes
Oct 28, 2025
infiloop2
reviewed
Oct 28, 2025
core/capabilities/fakes/evm_chain.go
Outdated
|
|
||
| // Convert proto big-int to *big.Int; nil ⇒ latest (handled by geth toBlockNumArg) | ||
| var blockArg *big.Int | ||
| if input != nil { |
Contributor
There was a problem hiding this comment.
linter is complaning here
<file name="core/capabilities/fakes/evm_chain.go">
<error column="5" line="308" message="SA5011(related information): this check suggests that the pointer can be nil" severity="error" source="staticcheck"></error>
</file>
</checkstyle>
I see we directly access input.Account before. should that also be fixed to be under nil check or can we just expect this to be non nil?
Contributor
Author
There was a problem hiding this comment.
safe to just add a check.
timothyF95
previously approved these changes
Oct 28, 2025
infiloop2
previously approved these changes
Oct 28, 2025
7ec6163 to
c0ac9fb
Compare
infiloop2
approved these changes
Oct 28, 2025
krehermann
approved these changes
Oct 28, 2025
|
This was referenced Nov 7, 2025
This was referenced Nov 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




confirmed @george-dorin 's workflow succeeded after the fix: